function setImageField(src,asset_id,ajax_url)
{
  if(typeof asset_id != 'undefined'){
	field_obj = opener.sfAssetsLibrary.fileBrowserReturn(asset_id);
	$(field_obj).prev().val(src);
	
	var $jq_cont = $(field_obj).next().next().next('.thumb-div-container');
	$jq_cont = $jq_cont.length > 0 ? $jq_cont : $(field_obj).next().next('.thumb-div-container');
    //console.log($(field_obj));
	
	$jq_cont.get(0).className = "";
	$jq_cont.addClass('thumb-div-container').addClass('asset-id-'+asset_id);
	//$jq_cont.load(ajax_url,function(){window.close();});
	
	$.ajax({
		url   : ajax_url,
		cache : false,
		success: function(data){
			$jq_cont.html(data);
			window.close();
		}
	});

  }else{
	opener.sfAssetsLibrary.fileBrowserReturn(src);
	window.close();
  }
  
}
